package com.yuyou.activity.util.enums;


public class ZyPayEnums {

	public enum payApplyStatus{
		INTI(0),
		SUCCESS(1),
		FAIL(2);
		payApplyStatus(int value){
			this.value=value;
		}		
		private int value;		
		public int getValue() {
			return value;
		}
	}

	public enum payRufundStatus{
		INTI(0),
		SUCCESS(1),
		FAIL(2);
		payRufundStatus(int value){
			this.value=value;
		}		
		private int value;		
		public int getValue() {
			return value;
		}
	}

	
	public enum payApplyCode{
		_4011(4011,"无效sign：sign校验失败"),
		_4012(4012,"订单二次支付参数与首次支付不一致，校验失败"),
		_4013(4013,"订单已成功支付过"),
		_4014(4014,"无效金额")
		;
		payApplyCode(int key,String value){
			this.value=value;
		}	
		
		private int key;	
		private String value;	
		
		public int getKey() {
			return key;
		}	
		public String value() {
			return value;
		}
	}
	
	
	public enum payApplyNoticeCode{
		_4010(4011,"无效appId: appId不属于当前被调用服务"),
		_4011(4011,"无效sign：sign校验失败"),
		_4012(4012,"无效订单：找不到业务订单"),
		_4013(4013,"订单已成功支付过")
		;
		payApplyNoticeCode(int key,String value){
			this.value=value;
		}	
		
		private int key;	
		private String value;	
				
		public int getKey() {
			return key;
		}
		public String getValue() {
			return value;
		}

		public  static String getValByKey(int key){
			for(payApplyNoticeCode m:payApplyNoticeCode.values()){
				if(m.getKey()==key){
					return m.getValue();
				}
			}
						
			return "";
		}
		
		
	}
	
	public enum payRufundCode{
		_4010(4011,"无效参数：refundId"),
		_4011(4011,"无效签名"),
		_4012(4012,"无效订单：未能定位到支付订单记录/订单标识参数无效/未能定位到交易记录/该订单未支付不能退款"),
		_4013(4013,"无效退款金额:退款金额小于0或者大于订单总金额"),
		_4014(4014,"累加退款总金额大于支付订单总金额"),
		_4015(4015,"同一退款订单不能重复提交"),
		_5000(5000,"退款失败：第三方支付平台退款处理返回失败")
		;
		payRufundCode(int key,String value){
			this.value=value;
		}	
		
		private int key;	
		private String value;	
		
		public int getKey() {
			return key;
		}	
		public String value() {
			return value;
		}
	}
	
	public enum payRufundNoticeCode{
		_4010(4011,"无效appId: appId不属于当前被调用服务"),
		_4011(4011,"无效sign：sign校验失败"),
		_4012(4012,"无效订单：找不到退款订单"),
		_4013(4013,"退款金额不一致")
		;
		payRufundNoticeCode(int key,String value){
			this.value=value;
		}	
		
		private int key;	
		private String value;	
		
		public int getKey() {
			return key;
		}	
		public String value() {
			return value;
		}
	}
	
}
